﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="UTF-8" />
    <title>驰骋工作流程引擎设计器 - 系统登录</title>
    <script src="../../Scripts/QueryString.js" type="text/javascript"></script>
    <script src="../../Scripts/easyUI/jquery-1.8.0.min.js" type="text/javascript"></script>
    <script src="../../Scripts/config.js" type="text/javascript"></script>
    <script src="../../Comm/Gener.js" type="text/javascript"></script>
    <base target="_self" />
    <script type="text/javascript">
        
     
        //初始化页面函数.....
        $(function () {

            if (! +[1, ]) {
                //  alert("这是ie浏览器，您只能使用sliverlight版本浏览器。");
                // window.location.href = '../XAP/Designer.htm';
                // return;
            }

            $("body").keydown(function () {
                if (event.keyCode == 13) {
                    event.cancelBubble = true;
                    event.returnValue = false;
                    Login();
                }
            });

         //   if (plant == "JFlow") {
                document.getElementById("SLLink").style.display = "none";
           // }

            $("#Msg").html("<img src='../../Img/loading.gif' /><font color=blue>ccbpm 正在为登录/自动升级做准备.</font>");


            document.getElementById("Btn_Login").disabled = 'disabled';
            var doType = GetQueryString("DoType");
            if (doType == null)
                doType = "Login_Init";

            var handler = new HttpHandler("BP.WF.HttpHandler.WF_Admin_CCBPMDesigner");
            var data = handler.DoMethodReturnJSON("Login_InitInfo");
            document.title = data.SysName;

            //执行更新检查..
            data = handler.DoMethodReturnString(doType);

            if (data.indexOf('err@') == 0) {

                $("#Msg").html("<font color=red>" + data + ". 也许是: java/.net/phtyon 运行环境没有准备好导致的. 请确认运行环境</font>");

                return;
            }

            if (data.indexOf('url@') == 0) {
                var url = data.replace('url@', '');
                window.location.href = url;
                return;
            }

            document.getElementById("Btn_Login").disabled = false;

            $("#Msg").html("<font color=green>" + data+ "</font>");

        });

        //执行登录.
        function Login() {

            $("#Msg").html("<font> ccbpm 正在登录请稍候... </font>");

            var handler = new HttpHandler("BP.WF.HttpHandler.WF_Admin_CCBPMDesigner");

            var userNo = $("#TB_UserNo").val();
            var pass = $("#TB_Pass").val();

            if (userNo == "" || pass == "") {
                $("#Msg").html("<font>请输入用户名，密码.</font>");
                return;
            }

            handler.AddPara("TB_UserNo", userNo);
            handler.AddPara("TB_Pass", pass);

            var data = handler.DoMethodReturnString("Login_Submit");

            if (data.indexOf('err@') == 0) {
                $("#Msg").html("<font color=red>" + data + "</font>");
                return;
            }

            if (data.indexOf('url@') == 0) {
                window.location.href = data.replace('url@', '');
                return;
            }
            alert(data);

        }

    </script>
</head>
<body >

        <form id="cc" > 

        <center>
        <br />
        <br />
        <br />
        <br />
        <br />

        
<table style="text-align:left; border:1px;">

<tr>
<td> <img src="../../../DataUser/ICON/LogBiger.png" style=" width:200px;" /> </td>
<td> <h3>  &nbsp;&nbsp;流程&表单  <font color=green>设计器</font></h3>  </td>
</tr>


<tr>
<td style=" text-align:center "> 用户名</td>
<td><input  type="text" placeholder="用户名" value="admin" class="username" id="TB_UserNo" name="TB_UserNo" /> </td>
</tr>

<tr>
<td style=" text-align:center "> 密码</td>
<td> <input  type="password" placeholder="密码" class="password" id="TB_Pass" name="TB_Pass"/></td>
</tr>


<tr>
<td></td>
<td style=" text-align:left " > <input type="button" value="登录设计器系统" id="Btn_Login" name="Btn_Login" onclick="Login()" /> </td>
</tr>


<tr>
<td colspan=2> <div id="Msg" style=" float:right" />    </div> </td>
</tr>

<tr>
<td colspan=2> 
<a href="http://ccbpm.mydoc.io/" target="_blank" >
<img src="../../Img/Help.png" alt="" />帮助</a>
|
<a href="../../AppClassic/Login.htm">前台登录</a>   <a id="SLLink" href="../XAP/Designer.htm">Silverlight版本设计器</a> 
</td>
</tr>


</table>

             </center>

           
           </form>


</body>
</html>
